﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<% string col = TempData["controller"] as string, act = TempData["action"] as string;
   Func<string, string, string> ckmenu = (col1, act1) => col.Equals(col1, StringComparison.CurrentCultureIgnoreCase) && (string.IsNullOrEmpty(act1) || act.Equals(act1, StringComparison.CurrentCultureIgnoreCase)) ? "left_menu_sub_current" : null;
%>
<div id="right_sidebar">
    <div class="left_div_menu">
        <div class="left_menu_bar">
            产品管理
        </div>
        <div id="left_menu_sub_1" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                       <%=Html.ActionLink("产品管理", "index", "product", new { @class = ckmenu("product", "index") ?? ckmenu("product","edit") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("添加产品", "add", "product", new { @class = ckmenu("product", "add") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("分类管理", "type", "product", new { @class = ckmenu("product", "type") ?? ckmenu("product", "edittype") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("图片分类", "pictype", "product", new { @class = ckmenu("product", "pictype") ?? ckmenu("product", "editpictype") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            <%=Html.ActionLink("新闻管理", "index", "news", new { @class = ckmenu("news", null) }) %>
        </div>
        <div id="left_menu_sub_3" class="left_menu_sub">
        </div>
        <%--<div class="left_menu_bar">
            <%=Html.ActionLink("留言管理", "index", "message", new { @class = ckmenu("message", null) })%>
        </div>
        <div id="left_menu_sub_4" class="left_menu_sub">
        </div>--%>
        <div class="left_menu_bar">
            系统设置
        </div>
        <div id="left_menu_sub_5" class="left_menu_sub">
            <%
                var id = ViewData["Route_ID"] as string;    
            %>
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("系统设置", "index", "system", new { @class = ckmenu("system", "index") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("用户管理", "index", "manager", new { @class = ckmenu("manager", "index") ?? ckmenu("manager", "add") ?? ckmenu("manager", "edit") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("公司简介", "edit", "system", new { id = "companyprofile" }, new { @class = "companyprofile".Equals(id,StringComparison.CurrentCultureIgnoreCase) ? ckmenu("system", "edit") : null }) %>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("联系我们", "edit", "system", new { id = "contactus" }, new { @class = "contactus".Equals(id, StringComparison.CurrentCultureIgnoreCase) ? ckmenu("system", "edit") : null })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("质量控制", "edit", "system", new { id = "qualitycontrol" }, new { @class = "qualitycontrol".Equals(id, StringComparison.CurrentCultureIgnoreCase) ? ckmenu("system", "edit") : null })%>
                    </td>
                    <td width="49%">
                       <%=Html.ActionLink("图片管理", "index", "images", null, new { @class = ckmenu("images", "index") }) %>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("系统信息", "serverinfo", "system", new { @class = ckmenu("system", "serverinfo") })%>
                    </td>
                    <td width="49%">

                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            <%=Html.ActionLink("退出系统", "out", "login") %>
        </div>
        <div id="left_menu_sub_6" class="left_menu_sub">
        </div>
    </div>
</div>